<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script type="text/javascript">
	var system_basePath = "<%=basePath %>";
	$(function(){
		loadRoleList();
	});
	function loadRoleList(){
		$("#role_grid").jqGridInit({
			url : "/admin/role/list.do",
			colNames : [ 'ID', '角色名称','具体描述' ],
	        colModel : [ 
	                     {name : 'role_id',index : 'role_id',hidden:true,key:true,}, 
	                     {name : 'role_name',index : 'role_name',editable: true,editrules:{required:true,}}, 
	                     {name : 'role_desc',index : 'role_desc',editable: true,editrules:{required:true,}}, 
	                   ],
//	        caption : "",
	       	autowidth:true,
	        height:250,
	        multiselect:false,
		});
		$("#role_grid").navGridInit({
			search: {},
			refresh: {}
		});
	}
	function returnSelectRow(){
		var id = $("#role_grid").jqGrid("getGridParam","selrow");
		var rowData = $("#role_grid").jqGrid("getRowData",id);
		return rowData; 
	}
</script>
<div class="row">
	<table id="role_grid"></table>
</div>
